package com.springboot.cloud.sysadmin.organization.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.springboot.cloud.common.web.entity.vo.BaseVo;
import com.springboot.cloud.sysadmin.organization.entity.po.Dept;
import com.springboot.cloud.sysadmin.organization.entity.po.Monad;
import com.springboot.cloud.sysadmin.organization.entity.po.Position;
import com.springboot.cloud.sysadmin.organization.entity.po.User;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * Created by ZengJian on 2021/2/3 0003 上午 9:22
 */
@ApiModel
@Data
@NoArgsConstructor
public class UserVo extends BaseVo<User> {

    public UserVo(User user) {
        BeanUtils.copyProperties(user, this);
    }

    private String username;
    private String nickname;
    private String sex;
    private String mobile;
    private String email;
    private String avatar;
    private String description;
    private String deleted;
    private Boolean enabled;
    private Date loginIp;
    private Date loginDate;
    private String createdBy;
    private String updatedBy;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;
    private String idCard;
    private String wechatId;
    private String certificateNo;
    private String macAddress;
    private Set<String> roles;
    private Set<String> depts;
    private Set<String> positions;
    private Set<String> monads;

}
